/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package rg1basicdemo;

import java.util.Scanner;

/**
 *
 * @author apple
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        int a=3;
        int b=44;
        String s1="aaa";
        String s2="aaa";
        System.out.println(s1==s2);
        
        Student stu1=new Student("mike");
        Student stu2=new Student("mike");
        System.out.println(stu1==stu2);
        
        StringBuilder str1=new StringBuilder("aaaa");
        StringBuilder str2=new StringBuilder("aaaa");
        System.out.println(str1==str2);
        
        System.out.println(s1.equals(s2));
        
        a+=b;//  a=a+b;
        
        System.out.println("a="+a);
        b=100;
        int max=a>b?a:b;
        System.out.println("max="+max);
        
        System.out.println("请录入一个字符：");
        Scanner sin=new Scanner(System.in);
        char ch=sin.next().charAt(0);
        if((ch>='a'&&ch<='z')||(ch>='A'&&ch<='Z'))
        {
            System.out.println(ch+"是一个英文字母。");
        }
        else if(ch>='0'&&ch<='9')
        {
            System.out.println(ch+"是一个数字。");
        }
        else
            System.out.println(ch+"是一个符号。");
        
        System.out.println("请录入一个成绩：");
        int score=sin.nextInt();
        switch(score)
        {
            case 100:System.out.println("优秀");
        }
    }
    
}
